package com.encapsulation.exer2;

public class Bank {
	
	private Customer[] customers;
	private int numberOfCustomer ;//客户的个数
	public Bank() {
		customers = new Customer[10];
	}
	public void addCustomer(String f,String l){
		Customer cust = new Customer(f,l);
		customers[numberOfCustomer++]=cust;
		
	}
	//获取指定位置的客户
	public Customer getCustomers(int index) {
		if (index>=0 && index<numberOfCustomer){
			return customers[index];
		}
		return null;
		
	}
	
	public int getNumberOfCustomer() {
		return numberOfCustomer;
	}
	
	
	
}
